package com.smedi.ismedi.progress.core.application.query.Impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.application.query.MilestoneQueryService;
import com.smedi.ismedi.progress.core.application.query.ProgressQueryService;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.MilestoneProgressDetail;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProgressDetail;
import com.smedi.ismedi.progress.core.domain.repository.MliestoneRepository;
import com.smedi.ismedi.progress.core.domain.repository.ProgressRepository;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProgressDetailEntity;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProgressEntity;
import com.smedi.ismedi.web.starter.common.PaginationData;
import com.smedi.ismedi.web.starter.common.ResponseData;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 进度计划查询实现类
 *
 * @author liaojiajie
 * @date 2022/09/16
 */
@Service
@AllArgsConstructor
public class MilestoneQueryServiceImpl implements MilestoneQueryService {
    private final MliestoneRepository milestoneRepository;

    @Override
    public List<MilestoneProgressDetail> getMilestoneList(Long projectId) {
        return milestoneRepository.getMilestoneList(projectId);
    }

    @Override
    public Page<Progress> getMilestonePage(Long offset, Long pageSize,Long hrOrganizationId, Integer projectId, String projectManager, Integer mainCourtyard, Integer status, String projectCategory,String projectName) {
        return milestoneRepository.getMilestonePage(offset, pageSize,hrOrganizationId, projectId, projectManager, mainCourtyard, status, projectCategory,projectName);
    }
}
